/*
 * @Author: xiaosihan 
 * @Date: 2023-11-26 18:02:08 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-10-30 19:52:50
 */


import hashHistory from "@hashHistory";
import clsx from "clsx";
import { ReactNode, useRef, useState } from "react";
import { useLocation } from "react-router-dom";
import arrowPNG from "./arrow.png";
import styles from "./navMeun.module.less";

interface Iprops {
    children: ReactNode
}

//导航按钮
export default function NavMeun() {

    const dom = useRef<HTMLDivElement | null>(null);
    const [data, setData] = useState({});
    const [pathname, setPathname] = useState({});

    const local = useLocation();

    const goto = (pathName: string) => {
        hashHistory.push(pathName);
    }

    return (
        <div className={styles.NavMeun}>
            <span
                className={clsx(local.pathname === "/" && styles.active, styles.btn)}
                onClick={() => goto("/")}
            >模型总览</span>
            <img src={arrowPNG} className={styles.arrow} alt="" />
            <span
                className={clsx(local.pathname === "/verificationStatus" && styles.active, styles.btn)}
                onClick={() => goto("/verificationStatus")}
            >疑点分布</span>
            <img src={arrowPNG} className={styles.arrow} alt="" />
            <span
                className={clsx(local.pathname === "/doubtfulSituation" && styles.active, styles.btn)}
                onClick={() => goto("/doubtfulSituation")}
            >核查情况</span>
        </div>
    );

}

